Welcome to the third module
of how to build chatbots. In the previous module,
we mastered Intents. This module is entirely
dedicated to Entities, the second key component
of our dialogue skill. As you know by now,
Intents capture the user goal. Entities allow us to capture specific
values within the user utterance. You might recall this example
from the previous module. You'll notice how the chatbot is
correctly detecting the Intent, but completely ignoring
the specifics of the question. In other words,
"when is your Toronto store open?" And "when is your Vancouver store open?" Are the same as far as
our chatbot is concerned. That's because we haven't defined
an Entity to capture that specific bit of information, namely
the location of the store. So what we could do is
create a location Entity. Notice how we use an at symbol rather
than a pound symbol for entities. We can then define multiple values for
our Entity, such as Toronto, Montreal,
Vancouver, et cetera. One value for
each store location that we have. You'll notice that we can also define
synonyms for a given Entity value. These can be dictionary synonyms, but
are often synonyms in the sense that the user might refer to
the Entity value in that way. Imagine, for example, our Toronto
store is located on Warden Avenue. People might ask about hours of
operation of our Toronto Store, or they might phrase it as what are the hours
of operation of your Warden Avenue store? Either should lead our chatbot
to detect the same Entity value. Synonyms are optional, but
are a useful feature and worth defining when applicable. With our location Entity defined,
we can now detect the Intent and the specific location. With these two pieces of information,
we can provide an appropriate and specific answer to the user. Note that although Entities'
values can have spaces in them, we need a special syntax
to represent them. If the Entity value has a space in it,
we simply wrap it in parentheses to refer to it when later on we'll
define the rules of our dialog. Much like Intents,
we can also import Entities from CSV. In fact, in the labs for this module,
you will import them in this way and learn how to export them to CSV as well. Other than entering them
manually in Watson Assistant and importing them from CSV, there is also a
third way to add Entities to your chatbot. In fact, there are some predefined system Entities that you can enable
if needed by your chatbot. As you can see,
there are quite a few options. sys-currency allows us to detect mentions
of currencies within the user input. sys-date mentions of dates. For example, the user might reply to
a question with next Monday, and sys-date will allow us to capture that piece of
information as an actual specific date. sys-person allows us to detect common
names, an easy way to collect people's names to make your chatbot more personal
as you'll see later on in the course. System entities are quite handy, and
they are constantly being improved upon. Make sure you check the system Entities
available in your dialogue skill before you jump right to implementing
your own entities. All right, now it's your turn. By now, you should know the drill. In the rest of this module, you'll find a
series of guided exercises that will teach you how to work with Entities. You'll also find some graded quizzes. In the next module, we'll see how to
put the Intents and Entities we defined to good use to provide accurate and
specific responses to the user.